package com.back.demo.controller.myVO.errorBeanEnum;

import com.back.demo.controller.ResponseBeanEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
@AllArgsConstructor
public enum BasicResponseBeanEnum implements ResponseBeanEnum {
    /**
     * 通用
     */
    SUCCESS(200, "操作成功"),
    ERROR(500, "内部服务器错误"),
    AUTHENTICATION_ERROR(401, "请重新登录"),
    /**
     * basic模块：500xx
     */
    CAPTCHA_ERROR(50001, "验证码不正确"),
    USER_ERROR(50002, "用户状态异常"),
    LOGIN_ERROR(50003, "用户名或密码错误"),
    ACCESS_TOKEN_EXPIRED(50004, "access_token过期"),
    /**
     * 秒杀模块5005xx
     */
    EMPTY_STOCK(500500, "库存不足"),
    DUPLICATE_ORDER(500501, "该商品每人限购一件"),
    /**
     * 订单模块5003xx
     */
    ORDER_NOT_EXISTS(500300, "订单信息不存在");

    private final Integer code;
    private final String message;

}
